package com.erp.erp_servers.Message.imp;

import com.erp.erp_dao.Message.IMessageDAO;
import com.erp.erp_entitys.Message.MessageEntity;
import com.erp.erp_entitys.Message.MessageExample;
import com.erp.erp_entitys.Message.QueryUerMessageRes;
import com.erp.erp_servers.Message.IMessageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @ClassName ImpMessageService
 * @Description 消息实现类
 * @Author songjizhen
 * @Date 2020-06-30 22:46
 * @Version 1.0
 */
@Service
public class ImpMessageService implements IMessageService {
    @Autowired
    IMessageDAO messageDAO;

    @Override
    public int deleteByExample(MessageExample example) {
        return messageDAO.deleteByExample(example);
    }

    @Override
    public int deleteByPrimaryKey(Integer id) {
        return messageDAO.deleteByPrimaryKey(id);
    }

    @Override
    public int insert(MessageEntity record) {
        return messageDAO.insert(record);
    }

    @Override
    public int insertSelective(MessageEntity record) {
        return messageDAO.insertSelective(record);
    }

    @Override
    public List<MessageEntity> selectByExample(MessageExample example) {
        return messageDAO.selectByExample(example);
    }

    @Override
    public MessageEntity selectByPrimaryKey(Integer id) {
        return messageDAO.selectByPrimaryKey(id);
    }

    @Override
    public int updateByExampleSelective(MessageEntity record, MessageExample example) {
        return messageDAO.updateByExampleSelective(record,example);
    }

    @Override
    public int updateByExample(MessageEntity record, MessageExample example) {
        return messageDAO.updateByExample(record,example);
    }

    @Override
    public int updateByPrimaryKeySelective(MessageEntity record) {
        return messageDAO.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(MessageEntity record) {
        return messageDAO.updateByPrimaryKey(record);
    }

    @Override
    public List<QueryUerMessageRes> selectUerMessageRes(String receiverCode, Integer messageType) {
        return messageDAO.selectUerMessageRes(receiverCode,messageType);
    }
}
